//
//  LSZPriestPreachedVideoManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/9/20.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZPriestPreachedVideoManager.h"
#import "JKSongsMessStatus.h"
#import "LCPlaylist.h"
#import "NetworkTool+LCAVPlay.h"
@implementation LSZPriestPreachedVideoManager
-(id)initWithDicPriestPreachedVideoManager :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.mutDataArray = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData= dic[@"data"][@"res"];
        NSMutableArray * arrayMutData = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in arrayData){
            LSZPriestPreachedVideoMg * VideoMg = [[LSZPriestPreachedVideoMg alloc]init];
            VideoMg.id_id   = [diction[@"id"] integerValue];
            if ([[diction allKeys] containsObject:@"pic"]){
                VideoMg.pic = NullStringjudgment(NSStr(diction[@"pic"]));
            }
            else if ([[diction allKeys] containsObject:@"image300"]){
                VideoMg.pic  = NullStringjudgment(NSStr(diction[@"image300"]));
            }
            else{
                VideoMg.pic = NullStringjudgment(NSStr(diction[@"image300"]));
            }
            if ([[diction allKeys] containsObject:@"author"]){
                VideoMg.author = NullStringjudgment(NSStr(diction[@"author"]));
            }
            if ([[diction allKeys] containsObject:@"counts"]){
                VideoMg.counts = NullStringjudgment(NSStr(diction[@"counts"]));
            }
            if ([[diction allKeys] containsObject:@"introduce"]){
                VideoMg.introduce = NullStringjudgment(NSStr(diction[@"introduce"]));
            }
            [arrayMutData addObject:VideoMg];
        }
        self.mutDataArray = arrayMutData;
    }
    return self;
}
@end

@implementation LSZPriestPreachedVideoMg

@end
